package com.thinkgem.jeesite.modules.sys.dao;

import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
import com.thinkgem.jeesite.modules.sys.entity.TbProduct;
import com.thinkgem.jeesite.modules.sys.entity.TbProductExample;
import com.thinkgem.jeesite.modules.sys.entity.TbShop;
import com.thinkgem.jeesite.modules.sys.entity.TbShopProduct;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@MyBatisDao
public interface TbOverSeasProductDao {
    int countByExample(TbProductExample example);

    int deleteByExample(TbProductExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TbProduct record);

    int insertSelective(TbProduct record);
    //根据uid查询得到店铺id
    TbShop selectShopByUid(String uid);
    //根据商品id和店铺id判断该商品是否存在
    List<TbShopProduct> selectTbshopproduct(TbShopProduct tbShopProduct);
    //添加tb_shop_product中的商品信息
    Integer insertTbshopProduct(TbShopProduct tbShopProduct);
    //修改tb_shop_product中的商品信息
    Integer updateTbshopProduct(TbShopProduct tbShopProduct);
    //删除shop_product中的商品信息
    Integer deleteShopProduct(TbShopProduct tbShopProduct);

   List<TbProduct> selectByExample(TbProductExample example);

    TbProduct selectByPrimaryKey(Integer id);

    TbProduct selectProductBybarcode(String barcode);

    int updateByExampleSelective(@Param("record") TbProduct record, @Param("example") TbProductExample example);

    int updateByExample(@Param("record") TbProduct record, @Param("example") TbProductExample example);

    int updateByPrimaryKeySelective(TbProduct record);

    int updateByPrimaryKey(TbProduct record);

    List findByPage(TbProduct tbProduct);

}